#ifndef ALIEN_ATTACK_PLAYER_H
#define ALIEN_ATTACK_PLAYER_H

#include "ShooterObject.h"
#include "GameObjectFactory.h"
#include <vector>
#include <iostream>

struct Player : public ShooterObject
{
    Player();
    virtual ~Player() {}

    virtual void load(std::unique_ptr<LoaderParams> const &pParams);

    virtual void draw();
    virtual void update();
    virtual void clean();

    virtual void collision();

    virtual std::string type() { return "Player"; }

private:
    // bring the player back if there are lives left
    void ressurect();

    // handle any input from the keyboard, mouse, or joystick
    void handleInput();

    // handle any animation for the player
    void handleAnimation();

    // player can be invulnerable for a time
    int m_invulnerable;
    int m_invulnerableTime;
    int m_invulnerableCounter;
};

// for the factory
struct PlayerCreator : public BaseCreator
{
    GameObject *createGameObject() const
    {
        // TODO: fix this ?
        return new Player();
    }
};

#endif // header file protect